﻿using System;
using System.IO;
using HardMock.Recording;

namespace HardMock
{
    public sealed class StateFullHardMock : IHardMock
    {
        readonly StateLessHardMock stateLessHardMock;

        public StateFullHardMock(params Type[] excludedTypes)
        {
            stateLessHardMock = new StateLessHardMock(excludedTypes);
        }

        public T BuildRecorderOver<T>(T target) where T : class
        {
            return stateLessHardMock.BuildRecorderOver(target, new StateFullIdentifierFactory());
        }

        public T BuildMockFrom<T>(Stream recordedCallsBin) where T : class
        {
            return stateLessHardMock.BuildMockFrom<T>(recordedCallsBin, new StateFullIdentifierFactory());
        }
    }
}